package com.itheima.demo06.Predicate;

import java.util.function.Predicate;

public class Demo01Predicate {
    public static void main(String[] args) {
        String s = "abcdef";
        /*checkString(s, (str) -> {
            if (str.length() > 5) {
                return true;
            } else {
                return false;
            }
        });*/
        boolean b = checkString(s, str -> str.length() > 5);
        System.out.println(b);
    }

    public static boolean checkString(String s, Predicate<String> pre) {
        return pre.test(s);
    }
}
